var phoneData = [
    {
        "image": "./img/right.png",
        "name": "Redmi Note 14 Pro+",
    },
    {    
        "image": "./img/r1.webp",
        "name": "Xiaomi 15 Pro",
    },
    {    
        "image": "./img/r2.webp",
        "name": "Xiaomi 15",
    },
    {    
        "image": "./img/r3.webp",
        "name": "Xiaomi 15 定制版",
    },
    {    
        "image": "./img/r4.webp",
        "name": "Redmi Note 14 Pro",
    },
    {    
        "image": "./img/r5.webp",
        "name": "Redmi K70 至尊版",

    },
    {    
        "image": "./img/r6.png",
        "name": "Xiaomi MIX Filp",
    },
    {    
        "image": "./img/r7.webp",
        "name": "Xiaomi MIX Fold 4",
    },
    {
        "image": "./img/right.png",
        "name": "Redmi Note 14 Pro+",
    },
    {    
        "image": "./img/r1.webp",
        "name": "Xiaomi 15 Pro",
    },
    {    
        "image": "./img/r2.webp",
        "name": "Xiaomi 15",
    },
    {    
        "image": "./img/r3.webp",
        "name": "Xiaomi 15 定制版",
    },
    {    
        "image": "./img/r4.webp",
        "name": "Redmi Note 14 Pro",
    },
    {    
        "image": "./img/r5.webp",
        "name": "Redmi K70 至尊版",

    },
    {    
        "image": "./img/r6.png",
        "name": "Xiaomi MIX Filp",
    },
    {    
        "image": "./img/r7.webp",
        "name": "Xiaomi MIX Fold 4",
    },
    
    
]

var products = document.querySelector('.phone-box-right');


for (var i = 0; i < phoneData.length; i++) {
    var nli = document.createElement('div');
    nli.className = 'item';

    nli.innerHTML = `
        <a href="#">
            <img src="${phoneData[i].image}" alt="${phoneData[i].name}">
            <p class="item-name">${phoneData[i].name}</p>
        </a>
    `;

    products.appendChild(nli);
}